package swd.maintain.project.prggrp_right_maintain;

import java.util.*;

public class View {
   public View(){
      setMultiLang();
      setDBProperties();
   }
   private String gstrOnloadScript;
   public String getOnloadScript(){
      return this.gstrOnloadScript;
   }
   public void setOnloadScript(String pstrParameter){
   if(pstrParameter!=null && pstrParameter.equals("null")){pstrParameter=null;}
      this.gstrOnloadScript=pstrParameter;
   }
   private String gstrTipMessage;
   public String getTipMessage() {
       return this.gstrTipMessage;
   }

   public void setTipMessage(String pstrParameter) {
       if (pstrParameter != null && pstrParameter.equals("null")) {
           pstrParameter = null;
       }
       this.gstrTipMessage = pstrParameter;
   }

   private String gstrPrgAction;
   public String getPrgAction(){
      return this.gstrPrgAction;
   }
   public void setPrgAction(String pstrParameter){
   if(pstrParameter!=null && pstrParameter.equals("null")){pstrParameter=null;}
      this.gstrPrgAction=pstrParameter;
   }
   private String gstrPrgStatus;
   public String getPrgStatus(){
      return this.gstrPrgStatus;
   }
   public void setPrgStatus(String pstrParameter){
   if(pstrParameter!=null && pstrParameter.equals("null")){pstrParameter=null;}
      this.gstrPrgStatus=pstrParameter;
   }
   private String gstrFlowAction;
   public String getFlowAction(){
      return this.gstrFlowAction;
   }
   public void setFlowAction(String pstrParameter){
   if(pstrParameter!=null && pstrParameter.equals("null")){pstrParameter=null;}
      this.gstrFlowAction=pstrParameter;
   }
   private String gstrFlowStatus;
   public String getFlowStatus(){
      return this.gstrFlowStatus;
   }
   public void setFlowStatus(String pstrParameter){
   if(pstrParameter!=null && pstrParameter.equals("null")){pstrParameter=null;}
      this.gstrFlowStatus=pstrParameter;
   }
   private String gstrFlowNO;
   public String getFlowNO(){
      return this.gstrFlowNO;
   }
   public void setFlowNO(String pstrParameter){
   if(pstrParameter!=null && pstrParameter.equals("null")){pstrParameter=null;}
      this.gstrFlowNO=pstrParameter;
   }
   private String gstrPrgTitle;
   public String getPrgTitle(){
      return this.gstrPrgTitle;
   }
   public void setPrgTitle(String pstrParameter){
   if(pstrParameter!=null && pstrParameter.equals("null")){pstrParameter=null;}
      this.gstrPrgTitle=pstrParameter;
   }
   private String gstrseqno;
   public String getseqno(){
      return this.gstrseqno;
   }
   public void setseqno(String pstrParameter){
   if(pstrParameter!=null && pstrParameter.equals("null")){pstrParameter=null;}
      this.gstrseqno=pstrParameter;
   }
   private String gstrBtnAddShow;
   public String getBtnAddShow(){
      return this.gstrBtnAddShow;
   }
   public void setBtnAddShow(String pstrParameter){
   if(pstrParameter!=null && pstrParameter.equals("null")){pstrParameter=null;}
      this.gstrBtnAddShow=pstrParameter;
   }
   private String gstrBtnSaveShow;
   public String getBtnSaveShow(){
      return this.gstrBtnSaveShow;
   }
   public void setBtnSaveShow(String pstrParameter){
   if(pstrParameter!=null && pstrParameter.equals("null")){pstrParameter=null;}
      this.gstrBtnSaveShow=pstrParameter;
   }
   private String gstrBtnQueryShow;
   public String getBtnQueryShow(){
      return this.gstrBtnQueryShow;
   }
   public void setBtnQueryShow(String pstrParameter){
   if(pstrParameter!=null && pstrParameter.equals("null")){pstrParameter=null;}
      this.gstrBtnQueryShow=pstrParameter;
   }
   private String gstrBtnModifyShow;
   public String getBtnModifyShow(){
      return this.gstrBtnModifyShow;
   }
   public void setBtnModifyShow(String pstrParameter){
   if(pstrParameter!=null && pstrParameter.equals("null")){pstrParameter=null;}
      this.gstrBtnModifyShow=pstrParameter;
   }
   private String gstrBtnCancelShow;
   public String getBtnCancelShow(){
      return this.gstrBtnCancelShow;
   }
   public void setBtnCancelShow(String pstrParameter){
   if(pstrParameter!=null && pstrParameter.equals("null")){pstrParameter=null;}
      this.gstrBtnCancelShow=pstrParameter;
   }
   private String gstrBtnUpdateShow;
   public String getBtnUpdateShow(){
      return this.gstrBtnUpdateShow;
   }
   public void setBtnUpdateShow(String pstrParameter){
   if(pstrParameter!=null && pstrParameter.equals("null")){pstrParameter=null;}
      this.gstrBtnUpdateShow=pstrParameter;
   }
   private String gstrBtnApproveShow;
   public String getBtnApproveShow(){
      return this.gstrBtnApproveShow;
   }
   public void setBtnApproveShow(String pstrParameter){
   if(pstrParameter!=null && pstrParameter.equals("null")){pstrParameter=null;}
      this.gstrBtnApproveShow=pstrParameter;
   }
   private String gstrBtnRejectShow;
   public String getBtnRejectShow(){
      return this.gstrBtnRejectShow;
   }
   public void setBtnRejectShow(String pstrParameter){
   if(pstrParameter!=null && pstrParameter.equals("null")){pstrParameter=null;}
      this.gstrBtnRejectShow=pstrParameter;
   }
   private String gstrBtnDraftShow;
   public String getBtnDraftShow(){
      return this.gstrBtnDraftShow;
   }
   public void setBtnDraftShow(String pstrParameter){
   if(pstrParameter!=null && pstrParameter.equals("null")){pstrParameter=null;}
      this.gstrBtnDraftShow=pstrParameter;
   }
   private String gstrBtnExitShow;
   public String getBtnExitShow(){
      return this.gstrBtnExitShow;
   }
   public void setBtnExitShow(String pstrParameter){
   if(pstrParameter!=null && pstrParameter.equals("null")){pstrParameter=null;}
      this.gstrBtnExitShow=pstrParameter;
   }
   private String gstrBtnAddTitle;
   public String getBtnAddTitle(){
      return this.gstrBtnAddTitle;
   }
   public void setBtnAddTitle(String pstrParameter){
   if(pstrParameter!=null && pstrParameter.equals("null")){pstrParameter=null;}
      this.gstrBtnAddTitle=pstrParameter;
   }
   private String gstrBtnSaveTitle;
   public String getBtnSaveTitle(){
      return this.gstrBtnSaveTitle;
   }
   public void setBtnSaveTitle(String pstrParameter){
   if(pstrParameter!=null && pstrParameter.equals("null")){pstrParameter=null;}
      this.gstrBtnSaveTitle=pstrParameter;
   }
   private String gstrBtnQueryTitle;
   public String getBtnQueryTitle(){
      return this.gstrBtnQueryTitle;
   }
   public void setBtnQueryTitle(String pstrParameter){
   if(pstrParameter!=null && pstrParameter.equals("null")){pstrParameter=null;}
      this.gstrBtnQueryTitle=pstrParameter;
   }
   private String gstrBtnModifyTitle;
   public String getBtnModifyTitle(){
      return this.gstrBtnModifyTitle;
   }
   public void setBtnModifyTitle(String pstrParameter){
   if(pstrParameter!=null && pstrParameter.equals("null")){pstrParameter=null;}
      this.gstrBtnModifyTitle=pstrParameter;
   }
   private String gstrBtnCancelTitle;
   public String getBtnCancelTitle(){
      return this.gstrBtnCancelTitle;
   }
   public void setBtnCancelTitle(String pstrParameter){
   if(pstrParameter!=null && pstrParameter.equals("null")){pstrParameter=null;}
      this.gstrBtnCancelTitle=pstrParameter;
   }
   private String gstrBtnUpdateTitle;
   public String getBtnUpdateTitle(){
      return this.gstrBtnUpdateTitle;
   }
   public void setBtnUpdateTitle(String pstrParameter){
   if(pstrParameter!=null && pstrParameter.equals("null")){pstrParameter=null;}
      this.gstrBtnUpdateTitle=pstrParameter;
   }
   private String gstrBtnApproveTitle;
   public String getBtnApproveTitle(){
      return this.gstrBtnApproveTitle;
   }
   public void setBtnApproveTitle(String pstrParameter){
   if(pstrParameter!=null && pstrParameter.equals("null")){pstrParameter=null;}
      this.gstrBtnApproveTitle=pstrParameter;
   }
   private String gstrBtnRejectTitle;
   public String getBtnRejectTitle(){
      return this.gstrBtnRejectTitle;
   }
   public void setBtnRejectTitle(String pstrParameter){
   if(pstrParameter!=null && pstrParameter.equals("null")){pstrParameter=null;}
      this.gstrBtnRejectTitle=pstrParameter;
   }
   private String gstrBtnDraftTitle;
   public String getBtnDraftTitle(){
      return this.gstrBtnDraftTitle;
   }
   public void setBtnDraftTitle(String pstrParameter){
   if(pstrParameter!=null && pstrParameter.equals("null")){pstrParameter=null;}
      this.gstrBtnDraftTitle=pstrParameter;
   }
   private String gstrBtnExitTitle;
   public String getBtnExitTitle(){
      return this.gstrBtnExitTitle;
   }
   public void setBtnExitTitle(String pstrParameter){
   if(pstrParameter!=null && pstrParameter.equals("null")){pstrParameter=null;}
      this.gstrBtnExitTitle=pstrParameter;
   }
   private String gstrBtnUploadTitle;
   public String getBtnUploadTitle(){
      return this.gstrBtnUploadTitle;
   }
   public void setBtnUploadTitle(String pstrParameter){
   if(pstrParameter!=null && pstrParameter.equals("null")){pstrParameter=null;}
      this.gstrBtnUploadTitle=pstrParameter;
   }
   private String gstrDBAlias;
   public String getDBAlias(){
      return this.gstrDBAlias;
   }
   public void setDBAlias(String pstrParameter){
   if(pstrParameter!=null && pstrParameter.equals("null")){pstrParameter=null;}
      this.gstrDBAlias=pstrParameter;
   }
   private boolean gblnDBDebug;
   public boolean getDBDebug(){
      return this.gblnDBDebug;
   }
   public void setDBDebug(boolean pblnParameter){
      this.gblnDBDebug=pblnParameter;
   }
   private String gstrSourceCharset;
   public String getSourceCharset(){
      return this.gstrSourceCharset;
   }
   public void setSourceCharset(String pstrParameter){
   if(pstrParameter!=null && pstrParameter.equals("null")){pstrParameter=null;}
      this.gstrSourceCharset=pstrParameter;
   }
   private String gstrTargetCharset;
   public String getTargetCharset(){
      return this.gstrTargetCharset;
   }
   public void setTargetCharset(String pstrParameter){
   if(pstrParameter!=null && pstrParameter.equals("null")){pstrParameter=null;}
      this.gstrTargetCharset=pstrParameter;
   }
   private String gstrFrm1Name;
   public String getFrm1Name(){
      return this.gstrFrm1Name;
   }
   public void setFrm1Name(String pstrParameter){
   if(pstrParameter!=null && pstrParameter.equals("null")){pstrParameter=null;}
      this.gstrFrm1Name=pstrParameter;
   }
   private String gstrgroup_no;
   public String getgroup_no(){
      return this.gstrgroup_no;
   }
   public void setgroup_no(String pstrParameter){
   if(pstrParameter!=null && pstrParameter.equals("null")){pstrParameter=null;}
      this.gstrgroup_no=pstrParameter;
   }
   private String gstrgroup_noTitle;
   public String getgroup_noTitle(){
      return this.gstrgroup_noTitle;
   }
   public void setgroup_noTitle(String pstrParameter){
   if(pstrParameter!=null && pstrParameter.equals("null")){pstrParameter=null;}
      this.gstrgroup_noTitle=pstrParameter;
   }
   private boolean gblngroup_no_readonly;
   public boolean getgroup_no_readonly(){
      return this.gblngroup_no_readonly;
   }
   public void setgroup_no_readonly(boolean pblnParameter){
      try{
         this.gblngroup_no_readonly=pblnParameter;
      }
      catch(Exception e){
         e.printStackTrace();
      }
   }
   private String gstrp1;
   public String getp1(){
      return this.gstrp1;
   }
   public void setp1(String pstrParameter){
   if(pstrParameter!=null && pstrParameter.equals("null")){pstrParameter=null;}
      this.gstrp1=pstrParameter;
   }
   private String gstrp1Title;
   public String getp1Title(){
      return this.gstrp1Title;
   }
   public void setp1Title(String pstrParameter){
   if(pstrParameter!=null && pstrParameter.equals("null")){pstrParameter=null;}
      this.gstrp1Title=pstrParameter;
   }
   private boolean gblnp1_readonly;
   public boolean getp1_readonly(){
      return this.gblnp1_readonly;
   }
   public void setp1_readonly(boolean pblnParameter){
      try{
         this.gblnp1_readonly=pblnParameter;
      }
      catch(Exception e){
         e.printStackTrace();
      }
   }
   private String gstrp2;
   public String getp2(){
      return this.gstrp2;
   }
   public void setp2(String pstrParameter){
   if(pstrParameter!=null && pstrParameter.equals("null")){pstrParameter=null;}
      this.gstrp2=pstrParameter;
   }
   private String gstrp2Title;
   public String getp2Title(){
      return this.gstrp2Title;
   }
   public void setp2Title(String pstrParameter){
   if(pstrParameter!=null && pstrParameter.equals("null")){pstrParameter=null;}
      this.gstrp2Title=pstrParameter;
   }
   private boolean gblnp2_readonly;
   public boolean getp2_readonly(){
      return this.gblnp2_readonly;
   }
   public void setp2_readonly(boolean pblnParameter){
      try{
         this.gblnp2_readonly=pblnParameter;
      }
      catch(Exception e){
         e.printStackTrace();
      }
   }
   private String gstrp3;
   public String getp3(){
      return this.gstrp3;
   }
   public void setp3(String pstrParameter){
   if(pstrParameter!=null && pstrParameter.equals("null")){pstrParameter=null;}
      this.gstrp3=pstrParameter;
   }
   private String gstrp3Title;
   public String getp3Title(){
      return this.gstrp3Title;
   }
   public void setp3Title(String pstrParameter){
   if(pstrParameter!=null && pstrParameter.equals("null")){pstrParameter=null;}
      this.gstrp3Title=pstrParameter;
   }
   private boolean gblnp3_readonly;
   public boolean getp3_readonly(){
      return this.gblnp3_readonly;
   }
   public void setp3_readonly(boolean pblnParameter){
      try{
         this.gblnp3_readonly=pblnParameter;
      }
      catch(Exception e){
         e.printStackTrace();
      }
   }
   private String gstrp4;
   public String getp4(){
      return this.gstrp4;
   }
   public void setp4(String pstrParameter){
   if(pstrParameter!=null && pstrParameter.equals("null")){pstrParameter=null;}
      this.gstrp4=pstrParameter;
   }
   private String gstrp4Title;
   public String getp4Title(){
      return this.gstrp4Title;
   }
   public void setp4Title(String pstrParameter){
   if(pstrParameter!=null && pstrParameter.equals("null")){pstrParameter=null;}
      this.gstrp4Title=pstrParameter;
   }
   private boolean gblnp4_readonly;
   public boolean getp4_readonly(){
      return this.gblnp4_readonly;
   }
   public void setp4_readonly(boolean pblnParameter){
      try{
         this.gblnp4_readonly=pblnParameter;
      }
      catch(Exception e){
         e.printStackTrace();
      }
   }
   private String gstrp5;
   public String getp5(){
      return this.gstrp5;
   }
   public void setp5(String pstrParameter){
   if(pstrParameter!=null && pstrParameter.equals("null")){pstrParameter=null;}
      this.gstrp5=pstrParameter;
   }
   private String gstrp5Title;
   public String getp5Title(){
      return this.gstrp5Title;
   }
   public void setp5Title(String pstrParameter){
   if(pstrParameter!=null && pstrParameter.equals("null")){pstrParameter=null;}
      this.gstrp5Title=pstrParameter;
   }
   private boolean gblnp5_readonly;
   public boolean getp5_readonly(){
      return this.gblnp5_readonly;
   }
   public void setp5_readonly(boolean pblnParameter){
      try{
         this.gblnp5_readonly=pblnParameter;
      }
      catch(Exception e){
         e.printStackTrace();
      }
   }
   private String gstrp6;
   public String getp6(){
      return this.gstrp6;
   }
   public void setp6(String pstrParameter){
   if(pstrParameter!=null && pstrParameter.equals("null")){pstrParameter=null;}
      this.gstrp6=pstrParameter;
   }
   private String gstrp6Title;
   public String getp6Title(){
      return this.gstrp6Title;
   }
   public void setp6Title(String pstrParameter){
   if(pstrParameter!=null && pstrParameter.equals("null")){pstrParameter=null;}
      this.gstrp6Title=pstrParameter;
   }
   private boolean gblnp6_readonly;
   public boolean getp6_readonly(){
      return this.gblnp6_readonly;
   }
   public void setp6_readonly(boolean pblnParameter){
      try{
         this.gblnp6_readonly=pblnParameter;
      }
      catch(Exception e){
         e.printStackTrace();
      }
   }
   private String gstrp7;
   public String getp7(){
      return this.gstrp7;
   }
   public void setp7(String pstrParameter){
   if(pstrParameter!=null && pstrParameter.equals("null")){pstrParameter=null;}
      this.gstrp7=pstrParameter;
   }
   private String gstrp7Title;
   public String getp7Title(){
      return this.gstrp7Title;
   }
   public void setp7Title(String pstrParameter){
   if(pstrParameter!=null && pstrParameter.equals("null")){pstrParameter=null;}
      this.gstrp7Title=pstrParameter;
   }
   private boolean gblnp7_readonly;
   public boolean getp7_readonly(){
      return this.gblnp7_readonly;
   }
   public void setp7_readonly(boolean pblnParameter){
      try{
         this.gblnp7_readonly=pblnParameter;
      }
      catch(Exception e){
         e.printStackTrace();
      }
   }
   private String gstrp8;
   public String getp8(){
      return this.gstrp8;
   }
   public void setp8(String pstrParameter){
   if(pstrParameter!=null && pstrParameter.equals("null")){pstrParameter=null;}
      this.gstrp8=pstrParameter;
   }
   private String gstrp8Title;
   public String getp8Title(){
      return this.gstrp8Title;
   }
   public void setp8Title(String pstrParameter){
   if(pstrParameter!=null && pstrParameter.equals("null")){pstrParameter=null;}
      this.gstrp8Title=pstrParameter;
   }
   private boolean gblnp8_readonly;
   public boolean getp8_readonly(){
      return this.gblnp8_readonly;
   }
   public void setp8_readonly(boolean pblnParameter){
      try{
         this.gblnp8_readonly=pblnParameter;
      }
      catch(Exception e){
         e.printStackTrace();
      }
   }
   private String gstrprg_no;
   public String getprg_no(){
      return this.gstrprg_no;
   }
   public void setprg_no(String pstrParameter){
   if(pstrParameter!=null && pstrParameter.equals("null")){pstrParameter=null;}
      this.gstrprg_no=pstrParameter;
   }
   private String gstrprg_noTitle;
   public String getprg_noTitle(){
      return this.gstrprg_noTitle;
   }
   public void setprg_noTitle(String pstrParameter){
   if(pstrParameter!=null && pstrParameter.equals("null")){pstrParameter=null;}
      this.gstrprg_noTitle=pstrParameter;
   }
   private boolean gblnprg_no_readonly;
   public boolean getprg_no_readonly(){
      return this.gblnprg_no_readonly;
   }
   public void setprg_no_readonly(boolean pblnParameter){
      try{
         this.gblnprg_no_readonly=pblnParameter;
      }
      catch(Exception e){
         e.printStackTrace();
      }
   }
// Rory Chen Add ---------------------------------------------------------------
   private String[] gstrgroup_no_g;
   public String[] getgroup_no_g(){
      return this.gstrgroup_no_g;
   }
   public void setgroup_no_g(String[] pstrParameter){
   if(pstrParameter!=null && pstrParameter.equals("null")){pstrParameter=null;}
      this.gstrgroup_no_g=pstrParameter;
   }

   private String[] gstrprg_no_g;
   public String[] getprg_no_g(){
      return this.gstrprg_no_g;
   }
   public void setprg_no_g(String[] pstrParameter){
   if(pstrParameter!=null && pstrParameter.equals("null")){pstrParameter=null;}
      this.gstrprg_no_g=pstrParameter;
   }


   private String gstrrowsn=null;
   public String getrowsn(){
      return this.gstrrowsn;
   }
   public void setrowsn(String pstrParameter){
      this.gstrrowsn=pstrParameter;
   }

   private String gstrSelectShow;
   public String getSelectShow(){
      return this.gstrSelectShow;
   }
   public void setSelectShow(String pstrParameter){
      if(pstrParameter!=null && pstrParameter.equals("null")){pstrParameter=null;}
      this.gstrSelectShow=pstrParameter;
   }

   public void setReadOnly(boolean pstrParameter){
      this.setprg_no_readonly(pstrParameter);
      this.setgroup_no_readonly(pstrParameter);
   }

   public void setAllClear(){
      this.setprg_no("");
      this.setgroup_no("");
      this.setp1("");
      this.setp2("");
      this.setp3("");
      this.setp4("");
      this.setp5("");
      this.setp6("");
      this.setp7("");
      this.setp8("");
   }

   public void setButtonVisible(String strKind){
       // strKind 種類
       // 此為預設按鍵，如要新增或修改，請自行修改

       // 初始化
       this.setBtnSaveShow("none");

       // 新增
       if (strKind.equals("1")){
          this.setBtnAddShow("none");
          this.setBtnSaveShow("");
          this.setBtnQueryShow("none");
       }

       // Save
       if (strKind.equals("2")){
          this.setBtnAddShow("");
          this.setBtnSaveShow("none");
//          this.setBtnQueryShow("none");
       }

       // 查詢
       if (strKind.equals("3")){
          this.setBtnSaveShow("");
       }
   }



// -----------------------------------------------------------------------------

   private void setMultiLang(){
      ResourceBundle rbdTitleResource=ResourceBundle.getBundle("swd\\maintain\\project\\prggrp_right_maintain\\Multi-lang",Locale.getDefault());

      try{
         setgroup_noTitle(rbdTitleResource.getString("group_noTitle"));
         setprg_noTitle(rbdTitleResource.getString("prg_noTitle"));
         setFrm1Name(rbdTitleResource.getString("Frm1Name"));
         setBtnAddTitle(rbdTitleResource.getString("BtnAddTitle"));
         setBtnSaveTitle(rbdTitleResource.getString("BtnSaveTitle"));
         setBtnQueryTitle(rbdTitleResource.getString("BtnQueryTitle"));
         setBtnModifyTitle(rbdTitleResource.getString("BtnModifyTitle"));
         setBtnCancelTitle(rbdTitleResource.getString("BtnCancelTitle"));
         setBtnUpdateTitle(rbdTitleResource.getString("BtnUpdateTitle"));
         setBtnApproveTitle(rbdTitleResource.getString("BtnApproveTitle"));
         setBtnRejectTitle(rbdTitleResource.getString("BtnRejectTitle"));
         setBtnDraftTitle(rbdTitleResource.getString("BtnDraftTitle"));
         setBtnExitTitle(rbdTitleResource.getString("BtnExitTitle"));
         setBtnUploadTitle(rbdTitleResource.getString("BtnUploadTitle"));
         setPrgTitle(rbdTitleResource.getString("prgTitle"));
      }
      catch(Exception e){
         e.printStackTrace();
      }
   }
   private void setDBProperties(){
      ResourceBundle rbdTitleResource=ResourceBundle.getBundle("WEB_Config",Locale.getDefault());

      try{
         setDBAlias(rbdTitleResource.getString("DB_ALIAS"));
         setDBDebug(Boolean.valueOf(rbdTitleResource.getString("DEBUG")).booleanValue());
         setSourceCharset(rbdTitleResource.getString("SOURCE_CHARSET"));
         setTargetCharset(rbdTitleResource.getString("TARGET_CHARSET"));
      }
      catch(Exception e){
         e.printStackTrace();
      }
      finally{
         rbdTitleResource=null;
      }
   }
   public String getMessage(String pstrKey){
      return ResourceBundle.getBundle("swd\\maintain\\project\\prggrp_right_maintain\\Multi-lang",Locale.getDefault()).getString(pstrKey);
   }
}
